<?php
namespace Admin\Model;
use Think\Model;
class CategoryModel extends Model {

		protected $_validate = array(
				array('cate_name','require','文章栏目名称不得为空！',1), //默认情况下用正则进行验证
				array('cate_name','',"文章栏目名称不得重复！",1,'unique',3),
		);
		
		public function _before_del(){
			D('article')->where(array('cateid'=>$option['where']['id']))->delete();
		}
	
}